const app = getApp(); //引入导航

import { ReserveCount } from 'reserveCount.model.js';
var reservecount = new ReserveCount();
Page({
  data: {
    showIcon: true //显示返回键以及首页

  },
  onLoad: function (options) {
    var aid = options.id;
    this.data.aid = aid;

    this._onLoad();
  },
  _onLoad: function () {
    reservecount.getKaiShouXQ(this.data.aid, res => {
      //  console.log(res);
      this.setData({
        'List': res
      });
    });
  },
  liketap: function (e) {
    var aid = e.target.dataset.aid;
    this.data.aid = aid;
    reservecount.getKaiShouDelete(this.data.aid, data => {
      tt.redirectTo({
        url: '../myKaiShou/myKaiShou'
      });
    });
  }
});